//
//  Team9BaseTableViewCell.m
//  Team9Project
//
//  Created by 朱嘉祺 on 15/10/12.
//  Copyright © 2015年 apple. All rights reserved.
//

#import "Team9BaseTableViewCell.h"

@implementation Team9BaseTableViewCell

#pragma mark 夜间模式
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(changecolor) name:@"changecolor" object:nil];
    }
    return self;
}

- (void)changecolor{
    if ([Team9EveningType shareEvening].eveningFailling) {
        self.contentView.backgroundColor = [UIColor colorWithWhite:0.15 alpha:1];
        self.textLabel.textColor = [UIColor whiteColor];
    } else {
        self.contentView.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
        self.textLabel.textColor = [UIColor blackColor];
    }
}
- (void)layoutSubviews{
    [super layoutSubviews];
    [self changecolor];
}
- (void)dealloc{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)createView{}
- (void)p_contraints{}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
